package graphics.panels;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JButton;

public class NumberPanel extends JButton{

	private int number;
	
	
	public NumberPanel (int number) {
		super(String.valueOf(number));
		this.number = number;
		
	}
	
	@Override
	public final void paint(Graphics g) {
		
		
		super.paint(g);
			
		
//		if (number == 0) {
//			g.drawLine(0, 0, getWidth(), getHeight());
//			g.drawLine(0, getHeight(), getWidth(), 0);
//		}
	}
	
	public int getNumber () {
		return number;
	}
	
	public boolean isActive () {
		return number == 0 ? false : true;
	}
	
	public void setPassive () {
		number = 0;
		super.setBackground(Color.black);
		setText("");
		repaint();
	}
}
